package mvn21.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import mvn21.dao.UserDao;
import mvn21.model.User;
//数据访问层
@Repository("sqlserverdao")
public class UserDaoImpl implements UserDao {
	@Autowired   //按类型进行注入，要求类型的对象唯一
    private User user;

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	public void addUser() {
		System.out.println("SQLServers,添加数据到数据库");
		user.showInfo();
	}
}
